<?php
$goodId="";
if (getParameter("goodId")!=null)	$goodId=getParameter("goodId");
if ($goodId!="") {




$where="FROM immo_gallery gallery,immo_goods goods,portal_quartier quartier,portal_cities cities,immo_operationtype operationtype  WHERE  goods.id=".$goodId." and goods.operationtypeId = operationtype.id and goods.id = gallery.goodId and quartier.id = goods.quartierId and cities.id = goods.cityId and  gallery.showHome = 'Y' and goods.agencyId=".$agencyId."";

$rs=$GLOBALS["conn"]->Execute($sSql);
$sSql= "Select quartier.lib_".$lt." As quartier,  cities.lib_".$lt." As city,  goods.*, operationtype.lib_".$lang." As operation,  gallery.picture, gallery.title_".$LANG."  as title ".$where." " ;

Portal_log($sSql);
      $rs=$GLOBALS["conn"]->Execute($sSql);
	  ?>
<div class="announcementsTitle"><?php echo $rs->fields["title_".$LANG]; ?></div> 
 

	  <div class="homeTabs">

	
		 
	<table>
	<tr valign="top">
	<td>
 <div class="textContainer" style="float:<?php echo $left; ?>;width:342px;">

<div class="title">Réf :<?php echo $rs->fields["reference"]; ?></div>

<div class="headline"><?php echo $rs->fields["operation"]; ?> : <?php echo $rs->fields["city"]; ?> / <?php echo $rs->fields["quartier"]; ?> </div> 
<div class="description"><?php echo $rs->fields["description_".$LANG]; ?>
<div class="texte"><?php echo $rs->fields["text_".$LANG]; ?></div>
<br/>
<div class="headline"><?php echo $text_price; ?> : </div>

<div>
<?php echo $rs->fields["price"]; ?> <?php echo $text_dhs; ?>
<br/>
<?php echo $rs->fields["price"]*11; ?> â‚¬ (<?php echo $text_around; ?>)
</div>


</div>


</div>
</td>
<td>
<div class="imageContainer" style="float:<?php echo $right; ?>"> 
<a href="/immo/pictures/<?php echo $rs->fields["picture"]; ?>" rel="prettyPhoto[pp_gal]" title="<?php echo $rs->fields["title"]; ?>"><img class="image" src = "/immo/pictures/<?php echo $rs->fields["picture"]; ?>"  width="400px"/></a>
</div>
</td>
</tr>
</table>

<div class="headline" style="float:none"><?php echo $text_morephotos; ?> : </div>
  <?php
  $sSql="Select gallery.title_".$LANG."  as title, gallery.picture From immo_gallery gallery Where gallery.goodId = ".$goodId." And gallery.showHome = 'N'    ";
  Portal_log($sSql);
 $rs=$GLOBALS["conn"]->Execute($sSql);
	  ?>
<ul class="gallery slideshow clearfix">
	  <?php
 while ( !$rs->EOF)  { 
?>
<li>
<a href="/immo/pictures/<?php echo $rs->fields["picture"]; ?>" rel="prettyPhoto[pp_gal]" title="<?php echo $rs->fields["title"]; ?>"><img src="/immo/pictures/<?php echo $rs->fields["picture"]; ?>" width="130" height="130" alt="<?php echo $rs->fields["title"]; ?>" /></a>
</li>

				  <?php
		  $rs->MoveNext();    
		  }

	
?>
</ul>

<div class="tools_homeContent"> 

<table width="100%" height="26px"> <tbody>
<tr valign="top"> 
<td> <img src="./theme/facebook.png"><span> <a onclick="facebookShare('Ø±Ø¦ÙŠØ³ Ø§Ù„Ù…ÙƒØªØ¨ Ø§Ù„ÙˆØ·Ù†ÙŠ Ø§Ù„Ø³ÙŠØ¯ Ø­Ø³Ù† Ø¨Ù†Ø¹Ø¯ÙŠ','/ar/displayArticle?26542/ARTICLETEMPLATE');"><?php echo $text_facebookShare; ?></a> </span> </td>
 <td> <img src="./theme/tweet.png"><span> <a onclick="twitterShare('Ø±Ø¦ÙŠØ³ Ø§Ù„Ù…ÙƒØªØ¨ Ø§Ù„ÙˆØ·Ù†ÙŠ Ø§Ù„Ø³ÙŠØ¯ Ø­Ø³Ù† Ø¨Ù†Ø¹Ø¯ÙŠ','/ar/displayArticle?26542/ARTICLETEMPLATE');"><?php echo $text_tweeterShare; ?></a> </span> </td> 
<td> <img src="./theme/google.png"><span> <a onclick="twitterShare('Ø±Ø¦ÙŠØ³ Ø§Ù„Ù…ÙƒØªØ¨ Ø§Ù„ÙˆØ·Ù†ÙŠ Ø§Ù„Ø³ÙŠØ¯ Ø­Ø³Ù† Ø¨Ù†Ø¹Ø¯ÙŠ','/ar/displayArticle?26542/ARTICLETEMPLATE');"><?php echo $text_googleShare; ?></a> </span> </td> 
		</tr> </tbody></table> </div>





				  <?php
		 
	
?>
</div>

				  <?php
		 
	}
?>
<script>
$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook',slideshow:5000, autoplay_slideshow:true});
</script>